package com.woniu.platform.service.impl;

import com.woniu.platform.entity.PlatformRole;
import com.woniu.platform.mapper.PlatformRoleMapper;
import com.woniu.platform.service.PlatformRoleService;
import com.woniu.util.utils.HttpResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlatformRoleServiceImpl implements PlatformRoleService {
    @Autowired
    private PlatformRoleMapper platformRoleMapper;

    /**
     * 查询所有的用户信息
     * @return
     */
    @Override
    public HttpResult findallrole() {
        try {
            List<PlatformRole> roleList = platformRoleMapper.selectList(null);
            return new HttpResult().ok(roleList);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
